import { ref,onUpdated,onMounted } from 'vue'

export default function(){

    const sum = ref(0)
    
    function add() {
        sum.value += 1
    }

    onMounted(()=>{
        console.log("3组件挂载了")
    })

    onUpdated(()=>{
        console.log("3组件更新了")
    })

    return {sum,add}
}


